from config import path_cfg


class InvestApi(object):

    def __init__(self, session):
        self.session = session
        self.invest_url = path_cfg.P2P_URL + path_cfg.INVEST_URL

    # 投资接口
    def invest(self, req_body):
        return self.session.post(url=self.invest_url, data=req_body)

    # 第三方投资接口
    def third_invest(self, url, form_dict):
        return self.session.post(url=url, data=form_dict)
